The GrpClient object contains the following methods:
File names and file paths as expressed through the Group BLOB functions must adhere to the following rules:
| Element | Naming Rules |
|---|---|
| File names |
|
| File paths |
|
Both the complete path and the individual names retain their case, but are case-insensitive for searching, adding, and deleting.
The AddDirectory method creates a new directory at the specified path with the specified name, if the path exists.
AddDirectory(nodePath As String, newName as String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB node path where the directory will be created in the form "\\SITE.SERVICE\folder1\folder2". |
|
newName |
Yes |
The name of the directory to create. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
This adds a directory to the path specified. This will only work if the nodePath is valid.
If an invalid path is specified for nodePath, the directory will not be added and no error will be displayed.
Example
The following example adds a folder named "New" to the path specified. It then checks if the folder exists and alerts the user.
|
Sub addDir() GrpClient.AddDirectory "\\CYGDEMO.GRP\MyFolder", "New" edtMessage.Text = GrpClient.DirectoryExists("\\CYGDEMO.GRP\MyFolder\New") 'Returns True End Sub |
The AddNodeToCache method adds the Node with the specified ID to the cache.
AddNodeToCache(nodeId As String)
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to add to the cache. |
Example
The following example adds the Node with ID 0000000008 to the cache.
|
Sub GrpClient.AddNodeToCache "0000000008" End Sub |
The AttachChild method attaches the child with the specified ID to the parent with the specified ID.
AttachChild(childNodeId As String, parentNodeId As String, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
childNodeId |
Yes |
The ID of the child Node to attach to the parent Node. |
|
parentNodeId |
Yes |
The ID of the parent Node. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example attaches Node 0000000014 to parent Node 0000000008.
|
Sub GrpClient.AttachChild "0000000014", "0000000008" End Sub |
The CanCreateNodes method returns true if the user can create nodes in the GRP database.
CanCreateNodes(GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example verifies the user can create Nodes, and creates a Node.
|
Sub Dim bRet bRet = GrpClient.CanCreateNodes()
Dim strNodeId If bRet Then strNodeId = GrpClient.CreateNode("L", "~F", "My leaf Node") End If
MsgBox strNodeId End Sub |
The CanDeleteNodes method returns true if the user can delete nodes from the GRP database.
CanDeleteNodes(GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example verifies the user can delete Nodes, and deletes a Node.
|
Sub Dim bRet bRet = GrpClient.CanDeleteNodes()
If bRet Then GrpClient.DeleteNode "0000000015" End If End Sub |
The CanUpdateNodes method returns true if the user can update nodes in the GRP database.
CanUpdateNodes(GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example verifies the user can update Nodes, and updates a Node attribute.
|
Sub Dim bRet bRet = GrpClient.CanUpdateNodes()
If bRet Then GrpClient.UpdateNodeAttribute "0000000005", "~attryn0", "Yes" End If End Sub |
The CheckCacheState method forces an immediate check to see if the service has changed.
CheckCacheState(grpService As String)
| Parameter | Required | Description |
|---|---|---|
|
grpService |
Yes |
The GRP Site.Service to which to connect. |
Example
The following example evaluates the cache state using the value of the SiteService property from the script’s group client object.
|
Sub GrpClient.CheckCacheState GrpClient.SiteService End Sub |
The Connect method connects the object to a service.
Connect(DomainSiteService As String)
| Parameter | Required | Description |
|---|---|---|
|
DomainSiteService |
Yes |
The [Domain]Site.Service to which to connect. A domain is optional. The service must be a valid GRP. |
Returns 0 if successful and a non-zero value if the connection failed.
Example
The following example connects the GrpClient object to the CYGDEMO.GRP on domain 5410:
|
Sub GrpConnect() 'Connect to a GRP Dim GrpClient Set GrpClient = CreateObject("CxGrp.GrpClient") GrpClient.Connect("[5410]CYGDEMO.GRPS") End Sub |
The CopyGroupBlob method copies a Group BLOB node to a specified new Group BLOB location.
CopyGroupBlob(nodePath As String, newPath As String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB node pathto the node to be copied in the form "\\SITE.SERVICE\folder1\file.txt". |
|
newPath |
Yes |
The new path for the Node. This must be relative to nodePath, and in the form "\folder1\folder3". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
nodePath must specify a file. Directories cannot be copied.
If an invalid path is specified for nodePath or newPath, a run-time error will be displayed.
Example
The following example copies "Test.txt" from folder "2" to folder "3", and alerts the user that two copies exist.
|
Sub copyBlob() GrpClient.CopyGroupBlob "\\CYGDEMO.GRP\1\2\Test.txt", "\1\3" MsgBox GrpClient.FileExists("\\CYGDEMO.GRP\1\2\Test.txt") 'Returns True MsgBox GrpClient.FileExists("\\CYGDEMO.GRP\1\3\Test.txt") 'Returns True End Sub |
The CreateDirectory method creates a directory at the specified path, and all directories above in the full path.
CreateDirectory(nodePath As String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Y |
A node path to create in the form "\\SITE.SERVICE\folder1\folder2". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
This method creates a complete directory path. It will create any directory in the path that does not exist already.
If nodePath specifies an invalid path, the directory will not be created and no error will be displayed. If the user tries to create a folder that already exists, a new folder will be created inside the existing one with the same name (ex. \\CYGDEMO.GRP\test already exists. CreateDirectory("\\CYGDEMO.GRP\test") will make \\CYGDEMO.GRP\test\test)
Example
The following example creates a directory.
|
Sub createDir() GrpClient.CreateDirectory "\\CYGDEMO.GRP\NewFolder\Test\A" edtMessage.Text = GrpClient.DirectoryExists("\\CYGDEMO.GRP\NewFolder\Test\A") 'Returns True End Sub |
The CreateNode method creates a node and returns the new node ID.
CreateNode(nodeCat As String, nodeType As String, nodeDesc As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeCat |
Yes |
The ID of the category of the new Node. See Node Categories for a list of possible values. |
|
nodeType |
Yes |
The ID of the type of the new Node. See Node Types for a list of possible values. |
|
nodeDesc |
Yes |
The description of the Node. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example verifies the user can create Nodes, and creates a Node.
|
Sub Dim bRet bRet = GrpClient.CanCreateNodes()
Dim strNodeId If bRet Then strNodeId = GrpClient.CreateNode("L", "~F", "My leaf Node") End If
MsgBox strNodeId End Sub |
The DeleteNode method deletes the specified node.
DeleteNode(nodeId As String, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to delete. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example verifies the user can delete Nodes, and deletes a Node.
|
Sub Dim bRet bRet = GrpClient.CanDeleteNodes()
If bRet Then GrpClient.DeleteNode "0000000015" End If End Sub |
The DetachChild method detaches the child with the specified ID from the parent with the specified ID.
DetachChild(childNodeId As String, parentNodeId As String, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
childNodeId |
Yes |
The ID of the child Node to detach from the parent Node. |
|
parentNodeId |
Yes |
The ID of the parent Node. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example detaches Node 0000000014 from parent Node 0000000008.
|
Sub GrpClient.AttachChild "0000000014", "0000000008" End Sub |
The DirectoryExists method returns true if the directory at the specified path exists.
DirectoryExists(nodePath As String) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid node path in the form "\\SITE.SERVICE \folder1\folder2\". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
If nodePath specifies a file or an invalid path, this method will return False.
Example
The following example alerts the user whether or not "MyFolder" exists.
|
Sub dirExists() Dim bExists bExists = GrpClient.DirectoryExists("\\CYGDEMO.GRP\MyFolder\") If bExists Then edtMessage.Text = "MyFolder exists" Else edtMessage.TExt = "MyFolder does not exist" End If End Sub |
The Disconnect method disconnects from the service.
Disconnect() As Integer
The Disconnect method returns 0 if successful and a non-zero value if the disconnect failed.
Example
The following example disconnects from the connected GRP service.
|
Sub Dim iRet iRet = GrpClient.Disconnect() If iRet <> 0 Then MsgBox "Error in disconnecting" End If End Sub |
The FileExists method returns true if the file in the specified path exists.
FileExists(nodePath As String) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid node path in the form "\\SITE.SERVICE \folder1\file.txt". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
If nodePath specifies a folder or an invalid path, this method will return False.
Example
The following example alerts the user whether or not "File.txt" exists.
|
Sub fileExists() Dim bExists bExists = GrpClient.FileExists("\\CYGDEMO.GRP\MyFolder\File.txt") If bExists Then edtMessage.Text = "File.txt exists" Else edtMessage.TExt = "File.txt does not exist" End If End Sub |
The GetAttributeMetadata retrieves information about the columns in use in the current GRP in the form of an array of IGrpAttributeMetadata objects.
GetAttributeMetadata As Array()
The GetAttrValue method retrieves an attribute value for the specified Node.
GetAttrValue(nodeId As String, attrIdAsStringOrEnum As Variant, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve an attribute value. |
|
attrIdAsStringOrEnum |
Yes |
The ID of the attribute, as either the attribute’s name or its enumeration. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves an attribute value and displays it in a message box.
|
Sub Dim strVal strVal = GrpClient.GetAttrValue("0000000005", "~attr0")
MsgBox strVal End Sub |
The GetChildren method retrieves the child node ID list for a specified node.
GetChildren(parentNodeId As String, Criteria As String, OrderBy As String, ChildIdList As Variant, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
parentNodeId |
Yes |
The ID of the Node for which to retrieve children. |
|
Criteria |
Yes |
A set of semicolon-separated column/value parameter pairs used to filter the children. See Node Attributes for a list of possible attribute IDs by which to filter. |
|
OrderBy |
Yes |
A semicolon-separated list of columns by which to order the list of returned children. See Node Attributes for a list of possible attribute IDs by which to order. |
|
ChildIdList |
Yes |
The child Node ID list returned by this method. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves a filtered child Node list for parent Node 0000000008 and presents it in a message box.
|
Sub Dim aryChildren GrpClient.GetChildren "0000000008", "~type=~F;~attr0=ATTR_VAL", _ "~cat;~appl1", aryChildren
Dim i, strChildren For i = 0 To UBound(aryChildren) strChildren = strChildren & aryChildren(i) & vbCr Next
MsgBox strChildren End Sub |
The GetChildrenRecursive method retrieves the child node ID list recursively for a specified node.
GetChildrenRecursive(parentNodeId As String, Criteria As String, OrderBy As String, ChildIdList As Variant, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
parentNodeId |
Yes |
The ID of the Node for which to retrieve children recursively. |
|
Criteria |
Yes |
A set of semicolon-separated column/value parameter pairs used to filter the children. See Node Attributes for a list of possible attribute IDs by which to filter. |
|
OrderBy |
Yes |
A semicolon-separated list of columns by which to order the list of returned children. See Node Attributes for a list of possible attribute IDs by which to order. |
|
ChildIdList |
Yes |
The child Node ID list returned by this method. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
This method differs from GetChildren in that it will perform GetChildren on each returned child Node recursively until a leaf Node is reached.
Example
The following example retrieves a filtered child Node list for parent Node 0000000008 and presents it in a message box.
|
Sub Dim aryChildren GrpClient.GetChildrenRecursive "0000000008", "~type=~F;~attr0=ATTR_VAL", _ "~cat;~appl1", aryChildren
Dim i, strChildren For i = 0 To UBound(aryChildren) strChildren = strChildren & aryChildren(i) & vbCr Next
MsgBox strChildren End Sub |
The GetDirectoryNodeIdFromGroupBlobPath method returns the current node ID if a directory is specified and it returns the parent directory node ID if a file (leaf) is specified from the specified BLOB path.
GetDirectoryNodeIdFromGroupBlobPath(nodePath As String, grpService As String) As String
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Node path in the form "\folder1\folder2". |
|
grpService |
Yes |
The GRP Site.Service to which to connect. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
If nodePath specifies a file, this method will return the directory in which the file is located. If nodePath specifies an invalid path, an empty string is returned.
Example
The following example retrieves the Node ID from both a BLOB path and a file. In both cases, the return value is the same.
|
Sub getDirNodeId() MsgBox GrpClient.GetDirectoryNodeIdFromGroupBlobPath _ ("\MyFolder\file.txt", "CYGDEMO.GRP") 'Returns "0000000080"
MsgBox GrpClient.GetDirectoryNodeIdFromGroupBlobPath _ ("\MyFolder", "CYGDEMO.GRP") 'Returns "0000000080" End Sub |
The GetFileNodeIdFromGroupBlobPath method returns the correct node ID if a file (leaf) node is presented and it returns nothing if a directory is provided.
GetFileNodeIdFromGroupBlobPath(nodePath As String, grpService As String) As String
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Node path in the form "\folder1\file.txt". |
|
grpService |
Yes |
The GRP Site.Service to which to connect. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
If nodePath specifies a directory or an invalid path, an empty string is returned.
Example
The following example retrieves the Node ID for the specified file.
|
Sub getFileNodeId() MsgBox GrpClient.GetFileNodeIdFromGroupBlobPath _ ("\MyFolder\Test.txt", "CYGDEMO.GRP") 'Returns "0000000081" End Sub |
The GetFirstHierarchyLevelNode method retrieves the first hierarchy level node for the specified node.
GetFirstHierarchyLevelNode(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the first hierarchy level. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the first hierarchy level Node for a specified Node.
|
Sub Dim strNode strNode = GrpClient.GetFirstHierarchyLevelNode("0000000020")
MsgBox strNode End Sub |
The GetGroupBlobPathFromNodeId method retrieves the Group BLOB path for a specified Node ID.
GetGroupBlobPathFromNodeId(nodeID As String, grpService As String) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeID |
Yes |
The Node ID for which to retrieve a BLOB path. |
|
grpService |
Yes |
The GRP Site.Service to which to connect. |
This method works for both files and folders.
If NodeID is invalid or refers to a non-existent Node, an empty string is returned.
Example
The following example retrieves the Node path for the Node that has an ID of 0000000080.
|
Sub getBlobPath() MsgBox GrpClient.GetGroupBlobPathFromNodeId("0000000080", "CYGDEMO.GRP") 'Returns "\MyFolder" End Sub |
The GetHierarchyAsXml method retrieves a hierarchy in XML format, starting with the specified Node.
GetHierarchyAsXml(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the hierarchy XML. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example Retrieves the hierarchy of a specified Node as an XML string.
|
Sub Dim strXml strXml = GrpClient.GetHierarchyAsXml("0000000008")
MsgBox strXml End Sub |
The GetNodeAppDef1 method retrieves the Node App Defined 1 field for a specified node.
GetNodeAppDef1(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node App Defined 1 field. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node App Defined 1 field of a specified Node.
|
Sub MsgBox GrpClient.GetNodeAppDef1("0000000008") End Sub |
The GetNodeAppDef2 method retrieves the Node App Defined 2 field for a specified node.
GetNodeAppDef2(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node App Defined 2 field. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node App Defined 2 field of a specified Node.
|
Sub MsgBox GrpClient.GetNodeAppDef1("0000000008") End Sub |
The GetNodeAppDef3 method retrieves the Node App Defined 3 field for a specified node.
GetNodeAppDef3(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node App Defined 1 field. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node App Defined 3 field of a specified Node.
|
Sub MsgBox GrpClient.GetNodeAppDef3("0000000008") End Sub |
The GetNodeCat method retrieves the Node Category for a specified Node.
GetNodeCat(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Category. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Category of a specified Node.
|
Sub MsgBox GrpClient.GetNodeCat("0000000008") End Sub |
The GetNodeDesc method retrieves the Node Description for a specified node.
GetNodeDesc(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Description. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Description of a specified Node.
|
Sub MsgBox GrpClient.GetNodeDesc("0000000008") End Sub |
The GetNodeHierRoot method retrieves the Node Hierarchy Root for a specified node.
GetNodeHierRoot(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Hierarchy Root. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Hierarchy Root of a specified Node.
|
Sub MsgBox GrpClient.GetNodeHierRoot("0000000008") End Sub |
The GetNodeIdFromGroupBlobPath method retrieves the node ID for the node in the specified BLOB node path.
GetNodeIdFromGroupBlobPath(nodePath As String, grpService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Node path in the form "\folder1\file.txt" |
|
grpService |
Yes |
The GRP Site.Service to connect to |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
Example
The following example retrieves the Node Hierarchy Root of a specified Node.
|
Sub MsgBox GrpClient.GetNodeIdFromGroupBlobPath("\1\2\Test.txt", _ "CYGDEMO.GRP") End Sub |
The GetNodePathList method retrieves the Node path between the specified ancestor and descendant Nodes.
GetNodePathList(ancestorNodeId As String, descendantNodeId As String, NodePathList As Variant, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
ancestorNodeId |
Yes |
The ID of the starting Node in the path. |
|
descendantNodeId |
Yes |
The ID of the ending Node in the path. |
|
NodePathList |
Yes |
The Node path list returned by this method. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
Example
The following example retrieves the Node path between two Nodes and presents it in a message box.
|
Sub Dim aryPath GrpClient.GetNodePathList "0000000008", "0000000018", aryPath
Dim i, strPath For i = 0 To UBound(aryPath) strPath = strPath & aryPath(i) & vbCr Next
MsgBox strPath End Sub |
The GetNodeRefId method retrieves the Node Reference ID for a specified node.
GetNodeRefId(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Reference Id. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Reference ID of a specified Node.
|
Sub MsgBox GrpClient.GetNodeRefId("0000000008") End Sub |
The GetNodeRefService method retrieves the Node Reference Service for a specified node.
GetNodeRefService(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Reference Service. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Reference Service of a specified Node.
|
Sub MsgBox GrpClient.GetNodeRefService("0000000008") End Sub |
The GetNodeRefSite method retrieves the Node Reference Site for a specified node.
GetNodeRefSite(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Reference Site. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Reference Site of a specified Node.
|
Sub MsgBox GrpClient.GetNodeRefSite("0000000008") End Sub |
The GetNodes method retrieves the Node ID list for matching criteria.
GetNodes(Criteria As String, OrderBy As String, NodeIdList As Variant, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
Criteria |
Yes |
A set of semicolon-separated column/value parameter pairs used to filter the Nodes. See Node Attributes for a list of possible attribute IDs by which to filter. |
|
OrderBy |
Yes |
A semicolon-separated list of columns by which to order the list of returned Nodes. See Node Attributes for a list of possible attribute IDs by which to order. |
|
NodeIdList |
Yes |
The Node ID list returned by this method. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves a filtered Node list and presents it in a message box.
|
Sub Dim aryNodes GrpClient.GetNodes "~type=~F;~attr0=ATTR_VAL", _ "~cat;~appl1", aryNodes
Dim i, strNodes For i = 0 To UBound(aryNodes) strNodes = strNodes & aryNodes(i) & vbCr Next
MsgBox strNodes End Sub |
The GetNodeSecApp method retrieves the Node Security Application for a specified Node.
GetNodeSecApp(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Security Application. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Security Application of a specified Node.
|
Sub MsgBox GrpClient.GetNodeSecApp("0000000008") End Sub |
The GetNodeSecEvent method retrieves the Node Security Event for a specified node.
GetNodeSecurityEvent(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Security Event. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Security Event of a specified node.
|
Sub MsgBox GrpClient.GetNodeSecEvent("0000000008") End Sub |
The GetNodeType method retrieves the Node Type for a specified node.
GetNodeType(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to retrieve the Node Type. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves the Node Type of a specified Node.
|
Sub MsgBox GrpClient.GetNodeType("0000000008") End Sub |
The GetParents method retrieves the parent Node ID list for a specified node.
GetParents(childNodeId As String, Criteria As String, OrderBy As String, ParentIdList As Variant, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
childNodeId |
Yes |
The ID of the Node for which to retrieve parents. |
|
Criteria |
Yes |
A set of semicolon-separated column/value parameter pairs used to filter the parents. See Node Attributes for a list of possible attribute IDs by which to filter. |
|
OrderBy |
Yes |
A semicolon-separated list of columns by which to order the list of returned parents. See Node Attributes for a list of possible attribute IDs by which to order. |
|
ParentIdList |
Yes |
The parent Node ID list returned by this method. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves a filtered parent Node list for parent Node 0000000018 and presents it in a message box.
|
Sub Dim aryParents GrpClient.GetParents "0000000018", "~type=~F;~attr0=ATTR_VAL", _ "~cat;~appl1", aryParents
Dim i, strParents For i = 0 To UBound(aryParents) strParents = strParents & aryParents(i) & vbCr Next
MsgBox strParents End Sub |
The GetReferences method retrieves data for the services the GRP client references.
GetReferences(GrpSiteService As Variant) As Integer
| Parameter | Required | Description |
|---|---|---|
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example retrieves data for referenced services and displays a referenced service in a message box.
|
Sub GrpClient.GetReferences() MsgBox GrpClient.AccessControlService End Sub |
The HasAuxData method returns true if the specified node has auxiliary data stored.
HasAuxData(nodeId As String, grpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to check for auxiliary data. |
|
grpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example checks whether or not a Node has auxiliary data.
|
Sub MsgBox GrpClient.HasAuxData("0000000008") End Sub |
The HasChildren method returns true if the specified node has any children.
HasChildren(nodeId As String, Criteria As String, GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to check for children. |
| Criteria | Yes | A set of semicolon-separated column/value parameter pairs used to filter the children. See Node Attributes for a list of possible attribute IDs by which to filter. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example checks whether or not a node has children.
|
Sub MsgBox GrpClient.HasChildren("0000000008") End Sub |
The HasParents method returns true if the specified Node has any parents.
HasParents(nodeId As String, Criteria As String, GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to check for parents. |
| Criteria | Yes | A set of semicolon-separated column/value parameter pairs used to filter the parents. See Node Attributes for a list of possible attribute IDs by which to filter. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example checks whether or not a Node has parents.
|
Sub MsgBox GrpClient.HasParents("0000000008") End Sub |
The IsExpandable method returns true if the specified node is expandable.
IsExpandable(nodeId As String, GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to check for expandability. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example checks whether or not a Node is expandable.
|
Sub MsgBox GrpClient.IsExpandable("0000000008") End Sub |
The IsValidPath method returns true if the specified node path is valid.
IsViewable(nodePath As String) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A Node path to check for validity. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
This method does not check whether or not the Nodes in a path actually exist. Rather, it ensures that the nodePath parameter is in the correct Node path format.
Example
The following example checks whether or not a Node path is valid.
|
Sub MsgBox GrpClient.IsValidPath("\Root\Hierarchy\View\Level") 'displays True End Sub |
The IsViewable method returns true if the specified node is viewable.
IsViewable(nodeId As String, GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to check for viewability. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example checks whether or not a Node is viewable.
|
Sub MsgBox GrpClient.IsViewable("0000000008") End Sub |
The LoadAdminNodesForHierarchy method loads admin nodes from a file into the Group service.
LoadAdminNodesForHierarchy(grpService As String, filename As String, facSourcesToReplace As String, filetype As Long)
| Parameter | Required | Description |
|---|---|---|
|
grpService |
Yes |
The GRP Site.Service to connect to. |
|
filename |
Yes |
The path to the file containing the admin Nodes to load. This file must be a binary file, in the same format as the files generated by SaveAdminNodesForHierarchy. |
|
facSourcesToReplace |
Yes |
A set of semicolon-separated parameters specifying both strings to be replaced, and the replacement strings (for example, "SOMEONE.UIS=CYGDEMO.UIS;SOMEONE.FAC=CYGDEMO.FAC"). |
|
filetype |
Yes |
The only supported value for this parameter is:
|
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
This method will only load admin Nodes into the GRP service. To load all other Nodes, use LoadNodes.
Example
The following example loads admin Nodes from a file into the GRP service, and replaces all instances of "SOMEONE.UIS" with "CYGDEMO.UIS".
|
Sub Dim strNodesToReplace strNodesToReplace = "SOMEONE.UIS=" & GrpClient.SiteService
GrpClient.LoadAdminNodesForHierarchy GrpClient.SiteService, _ "C:\MyAdminNodes.dat", strNodesToReplace, 1 End Sub |
The LoadHierarchyCache method loads a hierarchy into the cache, starting with the specified node.
LoadHierarchyCache(nodeId As String, nMaxLevels As Long, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node at the top of the hierarchy to load into the cache. |
|
nMaxLevels |
Yes |
The maximum number of levels in the hierarchy to load into the cache. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example loads 5 levels of the hierarchy starting with Node 0000000008 into the cache.
|
Sub GrpClient.LoadHierarchyCache "0000000008", 5 End Sub |
The LoadNodes method loads nodes from a file into the Group service.
LoadNodes(grpService As String, filename As String, facSourcesToReplace As String, filetype As Long)
| Parameter | Required | Description |
|---|---|---|
|
grpService |
Yes |
The GRP Site.Service to connect to. |
|
filename |
Yes |
The path to the file containing the Nodes to load. This file must be a binary file, in the same format as the files generated by SaveNodes. |
|
facSourcesToReplace |
Yes |
A set of semicolon-separated parameters specifying both strings to be replaced, and the replacement strings (for example, "SOMEONE.UIS=CYGDEMO.UIS;SOMEONE.FAC=CYGDEMO.FAC"). |
|
filetype |
Yes |
The only supported value for this parameter is:
|
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
Example
The following example loads Nodes from a file into the GRP service, and replaces all instances of "SOMEONE.UIS" with "CYGDEMO.UIS".
|
Sub Dim strNodesToReplace strNodesToReplace = "SOMEONE.UIS=" & GrpClient.SiteService
GrpClient.LoadNodes GrpClient.SiteService, _ "C:\MyNodes.dat", strNodesToReplace, 1 End Sub |
The MoveGroupBlob method moves a Group BLOB node to a specified location.
MoveGroupBlob(nodePath As String, newPath As String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB node path the node to be moved in the form "\\SITE.SERVICE\folder1\file.txt". |
|
newPath |
Yes |
The new path for the Node. This must be relative to nodePath, and in the form "\folder1\folder2". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
nodePath must specify a file. Directories cannot be moved. The method will fail and display an error if a file with the same name already exists at newPath, or if nodePath or newPath specifies an invalid path.
Example
The following example moves "Test.txt" from folder "2" to folder "3", and alerts the user that only one copy exists.
|
Sub moveBlob() GrpClient.MoveGroupBlob "\\CYGDEMO.GRP\1\2\Test.txt", "\1\3" MsgBox GrpClient.FileExists("\\CYGDEMO.GRP\1\2\Test.txt") 'Returns False MsgBox GrpClient.FileExists("\\CYGDEMO.GRP\1\3\Test.txt") 'Returns True End Sub |
The NodeExists method returns true if the specified node exists.
NodeExists(nodeId As String, GrpSiteService As Variant) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node to check for existence. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example checks whether or not a node exists.
|
Sub MsgBox GrpClient.NodeExists("0000000008") End Sub |
The NodeIsADirectory method returns true if the specified node is a directory and returns false if the specified node is a file.
NodeIsADirectory(nodeID As String, grpService As String) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeID |
Yes |
A string containing a valid Node ID. |
|
grpService |
Yes |
The GRP Site.Service to connect to. |
Example
The following example checks if the Node is a directory and alerts the user.
|
Sub nodeIsDir() Dim isDir isDir = GrpClient.NodeIsADirectory("0000000081", GrpClient.SiteService) If isDir Then edtMessage.Text = "The node is a directory" Else edtMessage.Text = "The node is not a directory" End If End Sub |
The NodeIsAFile method correctly returns true if the specified node is a file and returns false if the specified node is a directory.
NodeIsAFile(nodeID As String, grpService As String) As Boolean
| Parameter | Required | Description |
|---|---|---|
|
nodeID |
Yes |
A string containing a valid Node ID. |
|
grpService |
Yes |
The GRP Site.Service to connect to. |
Example
The following example checks if the node is a file and alerts the user.
|
Sub nodeIsFile() Dim isFile isFile = GrpClient.NodeIsAFile("0000000080", GrpClient.SiteService) If isFile Then edtMessage.Text = "The node is a file" Else edtMessage.Text = "The node is not a file" End If End Sub |
The ReadAuxData method returns a specified node’s auxiliary data.
ReadAuxData(nodeId As String, GrpSiteService As Variant) As String
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the node from which to retrieve auxiliary data. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example displays a node’s auxiliary data.
|
Sub MsgBox GrpClient.ReadAuxData("0000000008") End Sub |
The ReadGroupBlob method reads data from the Group BLOB node.
ReadGroupBlob(nodePath As String) As String
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB path to the node to be read from in the form "\\SITE.SERVICE \folder1\file.txt". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
nodePath must specify a text file.
If nodePath specifies an invalid path or a directory, an empty string is returned.
This method with return the text stored inside of the file.
Example
The following example stores the contents of "File.txt" in a variable and displays it in an edit box.
|
Sub readBlob() Dim strFile strFile = GrpClient.ReadGroupBlob("\\CYGDEMO.GRP\MyFolder\File.txt") edtMessage.Text = strFile End Sub |
The ReadGroupBlobToFile method reads data from the specified Group BLOB node and stores it in a specified file.
ReadGroupBlobToFile(nodePath As String, dataPath As String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB node path to be read from in the form "\\SITE.SERVICE \folder1\file.txt". |
|
dataPath |
Yes |
A valid local file path to which the data will be written. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
nodePath and dataPath must specify text files. The file specified by DataPath will be overwritten or created once a valid directory exists.
If nodePath specifies an invalid path, an empty file will be created. If DataPath specifiies an invalid path, no file will be created and no error will be displayed.
Example
The following example saves the BLOB file "File.txt" as "Test.txt".
|
Sub readBlobToFile() GrpClient.ReadGroupBlobToFile "\\CYGDEMO.GRP\MyFolder\File.txt", "C:\Test.txt" edtMessage.Text = "C:\Test.txt has been created" End Sub |
The RemoveGroupBlobDir method removes the Group BLOB node from the hierarchy if it is a directory-type node.
RemoveGroupBlobDir(nodePath As String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB path to the node to be removed in the form "\\SITE.SERVICE \folder1\folder2\". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
If nodePath specifies an invalid path, an error will be displayed. If nodePath specifies a file, the file will be deleted.
Example
The following example deletes the "MyFolder" directory from the BLOB.
|
Sub removeBlobDir() GrpClient.RemoveGroupBlobDir "\\CYGDEMO.GRP\MyFolder\ " edtMessage.Text = "MyFolder has been removed" End Sub |
The RemoveGroupBlobFile method removes the Group BLOB node from the hierarchy if it is a file-type node.
RemoveGroupBlobFile(nodePath As String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB node path to be removed in the form "\\SITE.SERVICE \folder1\file.txt". |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
If nodePath specifies an invalid path or a directory, an error will be displayed.
Example
The following example deletes "Test.txt" from the BLOB.
|
Sub removeBlobFile() GrpClient.RemoveGroupBlobFile "\\CYGDEMO.GRP\MyFolder\Test.txt" edtMessage.Text = "Test.txt has been removed" End Sub |
The RenameGroupBlob method renames a Group BLOB node folder or file.
RenameGroupBlob(nodePath As String, newName As String)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB Node pathto the node to be renamed in the form "\\SITE.SERVICE \folder1\folder2". |
|
newName |
Yes |
The new name for the Group BLOB node. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
If nodePath specifies an invalid path, an error will be displayed. This method will fail if a file or folder already exists with the same name as newName.
Example
The following example renames "MyFolder" to "Test" and alerts the user.
|
Sub renameBlob() GrpClient.RenameGroupBlob "\\CYGDEMO.GRP\MyFolder", "Test" edtMessage.Text = GrpClient.DirectoryExists("\\CYGDEMO.GRP\Test") 'Returns True End Sub |
The SaveAdminNodesForHierarchy method saves admin Nodes in a specified hierarchy to a file.
SaveAdminNodesForHierarchy(grpService As String, hierarchy As String, filename As String, filetype As Long)
| Parameter | Required | Description |
|---|---|---|
|
grpService |
Yes |
The GRP Site.Service to connect to. |
|
hierarchy |
Yes |
The description of a Navigation Root Node. This Node must be of type Navigation Root (~V) and in the Root Group (R) category. |
|
filename |
Yes |
The name of the file (including the path) to which to save the admin Nodes. |
|
filetype |
Yes |
The only supported value for this parameter is:
|
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
This method will only save admin Nodes. To save all other Nodes, use SaveNodes.
Example
The following example saves admin Nodes to a file.
|
Sub GrpClient.SaveAdminNodesForHierarchy "CYGDEMO.GRP", "Navigation Hierarchy", _ "C:\MyAdminNodes.dat", 1 End Sub |
The SaveNodes method saves a Node and all of its children to a file.
SaveNodes(grpService As String, nodeID As String, filename As String, filetype As Long)
| Parameter | Required | Description |
|---|---|---|
|
grpService |
Yes |
The GRP Site.Service to connect to. |
|
nodeID |
Yes |
The ID of the Node at the top of the hierarchy to save. |
|
filename |
Yes |
The name of the file (including the path) to which to save the Nodes. |
|
filetype |
Yes |
The only supported value for this parameter is:
|
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
Example
The following example saves Nodes to a file.
|
Sub GrpClient.SaveNodes "CYGDEMO.GRP", "0000000008", "C:\MyNodes.dat", 1 End Sub |
The UpdateNodeAttribute method updates a specified Node’s attribute.
UpdateNodeAttribute(nodeId As String, attrId As String, attrValue As String, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
nodeId |
Yes |
The ID of the Node for which to update an attribute. |
|
attrId |
Yes |
The ID of the attribute to update. |
|
attrValue |
Yes |
The new value for the attribute. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example updates a Node’s attribute.
|
Sub GrpClient.UpdateNodeAttribute "0000000008", "~attr0", "NEW_VALUE" End Sub |
The WriteAuxData method writes auxiliary data to the specified group node.
WriteAuxData(nodeID As String, textData As String, GrpSiteService As Variant)
| Parameter | Required | Description |
|---|---|---|
|
nodeID |
Yes |
The ID of the Node to which to write auxiliary data. |
|
textData |
Yes |
The auxiliary data to write to the Node. |
|
GrpSiteService |
No |
The optional GRP Site.Service to connect to. If this parameter is not specified, this method will use the currently connected Site.Service (via Connect). |
Example
The following example writes auxiliary data to a node.
|
Sub GrpClient.WriteAuxData "0000000008", "Some auxiliary data" End Sub |
The WriteGroupBlob method writes data to the Group BLOB node in the path.
WriteGroupBlob(nodePath As String, nodeData As String, CreateDirectory As Boolean)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB node path to be written to in the form "\\SITE.SERVICE \folder1\file.txt". |
|
nodeData |
Yes |
The data to be written. |
|
CreateDirectory |
Yes |
If this parameter is set to True, the directory specified by nodePath will be created if it does not already exist. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
nodePath must specify a text file. If nodePath specifies a directory, or if Create is set to False and nodePath specifies a non-existent directory, an error will be displayed.
Example
The following example writes a new file to the BLOB containing the text "Hello World!"
|
Sub writeBlob() GrpClient.WriteGroupBlob "\\CYGDEMO.GRP\MyFolder\File.txt", "Hello World!", True End Sub |
The WriteGroupBlobFromFile method writes data from a file to the Group BLOB node at the specified path.
WriteGroupBlobFromFile(nodePath As String, dataPath As String, CreateDirectory As Boolean)
| Parameter | Required | Description |
|---|---|---|
|
nodePath |
Yes |
A valid Group BLOB node path to be written to in the form "\\SITE.SERVICE \folder1\file.txt". |
|
dataPath |
Yes |
The local file path to the data to be written. |
|
CreateDirectory |
Yes |
If this parameter is set to True, the directory specified by nodePath will be created if it does not already exist. |
See Group BLOB Naming Rules above for information about naming rules for file names and file paths.
nodePath and DataPath must specify text files. Binary data is not supported.
If nodePath specifies a directory, or if Create is set to False and nodePath specifies a non-existent directory, an error will be displayed.
If DataPath specifies an invalid path, an empty text document will be created at the path specified by nodePath.
Example
The following example writes the data from local file "New.txt" to the BLOB path as "Hi.txt".
|
Sub writeBlobFile() GrpClient.WriteGroupBlobFromFile _ "\\CYGDEMO.GRP\Folder\Hi.txt", "C:\New.txt", True edtMessage.Text = "New.txt has been added to the blob" End Sub |